'use client';

import { useEffect } from 'react';
import { useAuthStore } from '@/store/auth';

export function AuthInitializer({ children }: { children: React.ReactNode }) {
  const { initializeAuthState } = useAuthStore();

  useEffect(() => {
    initializeAuthState();
  }, [initializeAuthState]);

  return <>{children}</>;
}